package com.iuhao.orange.constants;

/**
 * @Author PK
 * @Description   订单状态枚举
 * @Date: Create in 10:26 2017/7/20
 * @Modified By:
 */
public enum OrderStatusEnum {
	
	REFUSE_ORDER(-4, "拒单"),
	
	DISCARD_ORDER(-3, "作废"),
	
	BACK_ORDER(-2, "退单"),

	BACK_CREDIT (-1, "征信退回"),

	LOAN_SAVE(0,"保存"),
	LOAN_APPLY(1,"申请贷款"),

	BUSINESS_ACCEPTANCE(4, "业务受理"),

	BANK_HANDLE(8,"银行受理"),
	
	BANK_AUDIT(12,"银行审批"),

	FIRST_VISIT(16,"一次上门"),

	FIRST_LENDING(20,"一次放款"),

	SECOND_VISIT(24,"二次上门"),

	SECOND_LENDING(28,"二次放款");


	private Integer key;
	
	private String desc;
	
	OrderStatusEnum(Integer key, String desc){
		this.key = key;
		this.desc = desc;
	}

    public static String getOrderStatusDesc(int key){
        OrderStatusEnum[] orderStatusEnum = OrderStatusEnum.values();
        for (OrderStatusEnum StatusEnum : orderStatusEnum) {
            if (key == StatusEnum.getKey()){
                return StatusEnum.getDesc();
            }
        }
        return "";
    }

    public String getDesc() {
        return desc;
    }

    public Integer getKey() {
        return key;
    }
}
